<template>
    <div class="title"> {{ msg }}</div>
</template>

<script setup lang='ts'>
defineProps<{
    msg: string
}>()
</script>
<style lang='less' scoped>  .title {
      margin: 0 auto;
      width: auto;
      height: 160px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 36px;
      background: linear-gradient(to right, #ff0000, #ffff00);
      /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
      -webkit-background-clip: text;
      /*将设置的背景颜色限制在文字中*/
      -webkit-text-fill-color: transparent;
      /*给文字设置成透明*/
  }
</style>